package com.yh.zz_hlj.modules.bean;

import com.yh.zz_hlj.R;
import com.yh.zz_hlj.fragment.AboutZWScanFragment;
import com.yh.zz_hlj.fragment.ChangePwdFragment;
import com.yh.zz_hlj.fragment.CustPhoneListFragment;
import com.yh.zz_hlj.fragment.DBDStockFragment;
import com.yh.zz_hlj.fragment.InStockFragment;
import com.yh.zz_hlj.fragment.OutStockFragment;
import com.yh.zz_hlj.fragment.OutherStockFragment;
import com.yh.zz_hlj.fragment.SalaryRepotFragment;
import com.yh.zz_hlj.fragment.TeamFragment;
import com.yh.zz_hlj.fragment.WGStockFragment;
import com.yh.zz_hlj.fragment.WorkReportFragment;
import com.yh.zz_hlj.fragment.ZXStockFragment;

public enum SimpleBackPage {
    ABOUT_ZWS(1, R.string.about, AboutZWScanFragment.class),
    WORK_DETAIL(2, R.string.about, WorkReportFragment.class),
    TEAM(7, R.string.myTeam, TeamFragment.class),
    SALARYREPORT(15, R.string.about, SalaryRepotFragment.class),
    CUST_PHEON(18, R.string.about, CustPhoneListFragment.class),
    CHANGE_PWD(25, R.string.about, ChangePwdFragment.class),
    OUTST(27, R.string.about, OutStockFragment.class),
    INST(28, R.string.about, InStockFragment.class),
    ZXST(29, R.string.about, ZXStockFragment.class),
    WGRK(30, R.string.about, WGStockFragment.class),
    OTHERCK(31, R.string.about, OutherStockFragment.class),
    DBD(32, R.string.about, DBDStockFragment.class),;

    private int title;
    private Class<?> clz;
    private int value;

    private SimpleBackPage(int value, int title, Class<?> clz) {
        this.value = value;
        this.title = title;
        this.clz = clz;
    }

    public int getTitle() {
        return title;
    }

    public void setTitle(int title) {
        this.title = title;
    }

    public Class<?> getClz() {
        return clz;
    }

    public void setClz(Class<?> clz) {
        this.clz = clz;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public static SimpleBackPage getPageByValue(int val) {
        for (SimpleBackPage p : values()) {
            if (p.getValue() == val)
                return p;
        }
        return null;
    }
}
